<?php
abstract class renderer_relation extends renderer_base 
{
    private $_obj;
    
    protected function _resolveDisplay($fObj, EDO_object_basic $obj)
    {
        if($obj)
        {
            $this->_obj = $obj;
            
            $display = ($fObj->getConfig('display'));
                    
            $regexp = "/(\%([a-zA-Z_]*))/si";
                    
            $display = preg_replace_callback($regexp, array($this, '_replacer'), $display);
                    
            $this->_obj = null;
            
            return $display;
        }
    }
    
    
    private function _replacer($matches)
    {
        return $this->_obj->getField($matches[2]);
    }
    
    
}